
import 'package:baselib/utils/log_util.dart';
import 'package:flutter/material.dart';
import 'package:framelib/utils/load_util.dart';

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;
var jsonData = [
  {
    "id": "2c9180878c493892018c497351900262",
    "concreteProjectVo": {
      "id": "2c9180878c493892018c493d01fa0006",
      "gmtCreate": "2023-12-08 19:43:04",
      "name": "新见见销售项目",
      "companyId": "2c928082889b91e801889bb177ce0019",
      "companyName": "珙县天顺商品混凝土有限公司",
      "customerId": "2c9180878c49221f018c493074a40000",
      "customerName": "四川新建建筑科技有限公司",
      "executeCompanyName": "新建科技",
      "engineeringName": "新津政府大楼建设项目",
      "contractCode": "HT0001",
      "contractMoney": "500000",
      "accountMoney": "100000.00",
      "soldMoney": "0",
      "balanceMoney": "96280.00",
      "warningMoney": "500",
      "balanceWarningType": 1,
      "contact": "李勋",
      "contactPhone": "18800008888",
      "projectAddress": "新津路10号",
      "isSignContract": null,
      "isCooperate": 1,
      "remark": "",
      "createUserName": null,
      "status": 2,
      "fileForms": null
    },
    "engineeringName": "新津政府大楼建设项目",
    "constructionLocation": "西门",
    "produceTaskId": "2c9180878c493892018c497122d4024f",
    "produceTaskName": "C30-40方",
    "invoiceNumber": "SHD2023120800005",
    "sendTime": "2023-12-08 20:42:34",
    "signTime": "2023-12-08 20:42:41",
    "finishedTime": "2023-12-08 20:42:44",
    "taskPouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringType": 1,
    "pouringMethodId": "1",
    "pouringMethod": "直卸",
    "scheduleCubicMeters": "3",
    "transferCubicMeters": "3.00",
    "totalCubicMeters": "6.00",
    "status": 5,
    "isDelayed": 0,
    "delayedTime": null,
    "waybillId": "2c9180878c493892018c497351880260",
    "projectId": "2c9180878b97fbbb018b98014dc70003",
    "projectName": "新川中心商混场",
    "projectAddress": null,
    "waybillNumber": "YD2023120800005",
    "paperNumber": null,
    "driverId": "2c90806c89cde2cb0189ce15c8e30003",
    "driverName": "测试司机",
    "mobile": null,
    "plateNumber": "川Q65323",
    "pouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringCodeName": "C30",
    "impermeabilityLevel": null,
    "mixingPlant": "1号搅拌站",
    "isSupplement": 0,
    "dispatcherName": null,
    "operatorName": "陈劲松",
    "supplyMethod": 1,
    "mobileDischargeLng": "104.084145",
    "mobileDischargeLat": "30.520185",
    "apaasDischargeLng": "",
    "apaasDischargeLat": "",
    "address": "中国四川省成都市双流区华阳街道新裕路在博雅城市广场C座1211附近",
    "mineralName": "C30",
    "mineralNumber": "XC-C30",
    "mineralTypeTypeId": "2c9180878b9807fd018b98162c370013",
    "mineralTypeTypeName": "商混",
    "salesUnitPrice": "80",
    "purchaseUnitPrice": null,
    "density": "2",
    "totalCost": "480.00",
    "purchaseTotalCost": null,
    "supplementFile": null,
    "purchaseVoucherFile": null,
    "customerId": "2c9180878c49221f018c493074a40000",
    "customerName": "四川新建建筑科技有限公司",
    "sellerId": null,
    "sellerName": null,
    "pouringLeaseContractId": "",
    "pouringLeaseContractName": null,
    "produceTaskVo": null,
    "cmprojectId": "2c9180878c493892018c493d01fa0006",
    "cmprojectName": "新见见销售项目",
    "cmprojectAddress": null
  },
  {
    "id": "2c9180878c493892018c49714e000255",
    "concreteProjectVo": {
      "id": "2c9180878c493892018c493d01fa0006",
      "gmtCreate": "2023-12-08 19:43:04",
      "name": "新见见销售项目",
      "companyId": "2c928082889b91e801889bb177ce0019",
      "companyName": "珙县天顺商品混凝土有限公司",
      "customerId": "2c9180878c49221f018c493074a40000",
      "customerName": "四川新建建筑科技有限公司",
      "executeCompanyName": "新建科技",
      "engineeringName": "新津政府大楼建设项目",
      "contractCode": "HT0001",
      "contractMoney": "500000",
      "accountMoney": "100000.00",
      "soldMoney": "0",
      "balanceMoney": "96280.00",
      "warningMoney": "500",
      "balanceWarningType": 1,
      "contact": "李勋",
      "contactPhone": "18800008888",
      "projectAddress": "新津路10号",
      "isSignContract": null,
      "isCooperate": 1,
      "remark": "",
      "createUserName": null,
      "status": 2,
      "fileForms": null
    },
    "engineeringName": "新津政府大楼建设项目",
    "constructionLocation": "西门",
    "produceTaskId": "2c9180878c493892018c497122d4024f",
    "produceTaskName": "C30-40方",
    "invoiceNumber": "SHD2023120800004",
    "sendTime": "2023-12-08 20:40:22",
    "signTime": "2023-12-08 20:40:32",
    "finishedTime": "2023-12-08 20:40:33",
    "taskPouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringType": 1,
    "pouringMethodId": "1",
    "pouringMethod": "直卸",
    "scheduleCubicMeters": "8",
    "transferCubicMeters": "0",
    "totalCubicMeters": "8",
    "status": 5,
    "isDelayed": 0,
    "delayedTime": null,
    "waybillId": "2c9180878c493892018c49714df20253",
    "projectId": "2c9180878b97fbbb018b98014dc70003",
    "projectName": "新川中心商混场",
    "projectAddress": null,
    "waybillNumber": "YD2023120800004",
    "paperNumber": null,
    "driverId": "2c90806c89cde2cb0189ce15c8e30003",
    "driverName": "测试司机",
    "mobile": null,
    "plateNumber": "川Q65323",
    "pouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringCodeName": "C30",
    "impermeabilityLevel": null,
    "mixingPlant": "1号搅拌站",
    "isSupplement": 0,
    "dispatcherName": "测试2",
    "operatorName": "陈劲松",
    "supplyMethod": 1,
    "mobileDischargeLng": "104.084146",
    "mobileDischargeLat": "30.520181",
    "apaasDischargeLng": "",
    "apaasDischargeLat": "",
    "address": "中国四川省成都市双流区华阳街道新裕路在博雅城市广场C座1211附近",
    "mineralName": "C30",
    "mineralNumber": "XC-C30",
    "mineralTypeTypeId": "2c9180878b9807fd018b98162c370013",
    "mineralTypeTypeName": "商混",
    "salesUnitPrice": "80",
    "purchaseUnitPrice": null,
    "density": "2",
    "totalCost": "640.00",
    "purchaseTotalCost": null,
    "supplementFile": null,
    "purchaseVoucherFile": null,
    "customerId": "2c9180878c49221f018c493074a40000",
    "customerName": "四川新建建筑科技有限公司",
    "sellerId": null,
    "sellerName": null,
    "pouringLeaseContractId": "",
    "pouringLeaseContractName": null,
    "produceTaskVo": null,
    "cmprojectId": "2c9180878c493892018c493d01fa0006",
    "cmprojectName": "新见见销售项目",
    "cmprojectAddress": null
  },
  {
    "id": "2c9180878c493892018c495d2a8d0244",
    "concreteProjectVo": {
      "id": "2c9180878c493892018c493d01fa0006",
      "gmtCreate": "2023-12-08 19:43:04",
      "name": "新见见销售项目",
      "companyId": "2c928082889b91e801889bb177ce0019",
      "companyName": "珙县天顺商品混凝土有限公司",
      "customerId": "2c9180878c49221f018c493074a40000",
      "customerName": "四川新建建筑科技有限公司",
      "executeCompanyName": "新建科技",
      "engineeringName": "新津政府大楼建设项目",
      "contractCode": "HT0001",
      "contractMoney": "500000",
      "accountMoney": "100000.00",
      "soldMoney": "0",
      "balanceMoney": "96280.00",
      "warningMoney": "500",
      "balanceWarningType": 1,
      "contact": "李勋",
      "contactPhone": "18800008888",
      "projectAddress": "新津路10号",
      "isSignContract": null,
      "isCooperate": 1,
      "remark": "",
      "createUserName": null,
      "status": 2,
      "fileForms": null
    },
    "engineeringName": "新津政府大楼建设项目",
    "constructionLocation": "东门",
    "produceTaskId": "2c9180878c493892018c49415dea01ff",
    "produceTaskName": "C30-100方",
    "invoiceNumber": "SHD2023120800003",
    "sendTime": "2023-12-08 20:18:37",
    "signTime": "2023-12-08 20:18:47",
    "finishedTime": "2023-12-08 20:18:52",
    "taskPouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringType": 2,
    "pouringMethodId": "2c9180878c1fe469018c2359293701fa",
    "pouringMethod": "天泵",
    "scheduleCubicMeters": "3",
    "transferCubicMeters": "3.50",
    "totalCubicMeters": "6.50",
    "status": 5,
    "isDelayed": 0,
    "delayedTime": null,
    "waybillId": "2c9180878c493892018c495d2a7e0242",
    "projectId": "2c9180878b97fbbb018b98014dc70003",
    "projectName": "新川中心商混场",
    "projectAddress": null,
    "waybillNumber": "YD2023120800003",
    "paperNumber": null,
    "driverId": "2c90806c89cde2cb0189ce15c8e30003",
    "driverName": "测试司机",
    "mobile": null,
    "plateNumber": "川Q65323",
    "pouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringCodeName": "C30",
    "impermeabilityLevel": "P4",
    "mixingPlant": "1号搅拌站",
    "isSupplement": 0,
    "dispatcherName": null,
    "operatorName": "陈劲松",
    "supplyMethod": 1,
    "mobileDischargeLng": "104.084167",
    "mobileDischargeLat": "30.520187",
    "apaasDischargeLng": "",
    "apaasDischargeLat": "",
    "address": "中国四川省成都市双流区华阳街道新裕路在博雅城市广场C座1211附近",
    "mineralName": "C30",
    "mineralNumber": "XC-C30",
    "mineralTypeTypeId": "2c9180878b9807fd018b98162c370013",
    "mineralTypeTypeName": "商混",
    "salesUnitPrice": "80",
    "purchaseUnitPrice": null,
    "density": "2",
    "totalCost": "520.00",
    "purchaseTotalCost": null,
    "supplementFile": null,
    "purchaseVoucherFile": null,
    "customerId": "2c9180878c49221f018c493074a40000",
    "customerName": "四川新建建筑科技有限公司",
    "sellerId": null,
    "sellerName": null,
    "pouringLeaseContractId": "2c9180878c1fe469018c235aa35301fc",
    "pouringLeaseContractName": "时代峰骏泵租赁 1109",
    "produceTaskVo": null,
    "cmprojectId": "2c9180878c493892018c493d01fa0006",
    "cmprojectName": "新见见销售项目",
    "cmprojectAddress": null
  },
  {
    "id": "2c9180878c493892018c494c1d48022f",
    "concreteProjectVo": {
      "id": "2c9180878c493892018c493d01fa0006",
      "gmtCreate": "2023-12-08 19:43:04",
      "name": "新见见销售项目",
      "companyId": "2c928082889b91e801889bb177ce0019",
      "companyName": "珙县天顺商品混凝土有限公司",
      "customerId": "2c9180878c49221f018c493074a40000",
      "customerName": "四川新建建筑科技有限公司",
      "executeCompanyName": "新建科技",
      "engineeringName": "新津政府大楼建设项目",
      "contractCode": "HT0001",
      "contractMoney": "500000",
      "accountMoney": "100000.00",
      "soldMoney": "0",
      "balanceMoney": "96280.00",
      "warningMoney": "500",
      "balanceWarningType": 1,
      "contact": "李勋",
      "contactPhone": "18800008888",
      "projectAddress": "新津路10号",
      "isSignContract": null,
      "isCooperate": 1,
      "remark": "",
      "createUserName": null,
      "status": 2,
      "fileForms": null
    },
    "engineeringName": "新津政府大楼建设项目",
    "constructionLocation": "东门",
    "produceTaskId": "2c9180878c493892018c49415dea01ff",
    "produceTaskName": "C30-100方",
    "invoiceNumber": "SHD2023120800002",
    "sendTime": "2023-12-08 20:01:29",
    "signTime": "2023-12-08 20:01:54",
    "finishedTime": "2023-12-08 20:02:55",
    "taskPouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringType": 2,
    "pouringMethodId": "2c9180878c1fe469018c2359293701fa",
    "pouringMethod": "天泵",
    "scheduleCubicMeters": "5",
    "transferCubicMeters": "0",
    "totalCubicMeters": "5",
    "status": 5,
    "isDelayed": 0,
    "delayedTime": null,
    "waybillId": "2c9180878c493892018c494c1d3a022d",
    "projectId": "2c9180878b97fbbb018b98014dc70003",
    "projectName": "新川中心商混场",
    "projectAddress": null,
    "waybillNumber": "YD2023120800002",
    "paperNumber": null,
    "driverId": "2c90806c89cde2cb0189ce15c8e30003",
    "driverName": "测试司机",
    "mobile": null,
    "plateNumber": "川Q65323",
    "pouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringCodeName": "C30",
    "impermeabilityLevel": null,
    "mixingPlant": "1号搅拌站",
    "isSupplement": 0,
    "dispatcherName": "测试2",
    "operatorName": "陈劲松",
    "supplyMethod": 1,
    "mobileDischargeLng": "104.084136",
    "mobileDischargeLat": "30.520164",
    "apaasDischargeLng": "",
    "apaasDischargeLat": "",
    "address": "中国四川省成都市双流区华阳街道新裕路在博雅城市广场C座1211附近",
    "mineralName": "C30",
    "mineralNumber": "XC-C30",
    "mineralTypeTypeId": "2c9180878b9807fd018b98162c370013",
    "mineralTypeTypeName": "商混",
    "salesUnitPrice": "80",
    "purchaseUnitPrice": null,
    "density": "2",
    "totalCost": "400.00",
    "purchaseTotalCost": null,
    "supplementFile": null,
    "purchaseVoucherFile": null,
    "customerId": "2c9180878c49221f018c493074a40000",
    "customerName": "四川新建建筑科技有限公司",
    "sellerId": null,
    "sellerName": null,
    "pouringLeaseContractId": "2c9180878c1fe469018c235aa35301fc",
    "pouringLeaseContractName": "时代峰骏泵租赁 1109",
    "produceTaskVo": null,
    "cmprojectId": "2c9180878c493892018c493d01fa0006",
    "cmprojectName": "新见见销售项目",
    "cmprojectAddress": null
  },
  {
    "id": "2c9180878c493892018c4947d5c4021e",
    "concreteProjectVo": {
      "id": "2c9180878c493892018c493d01fa0006",
      "gmtCreate": "2023-12-08 19:43:04",
      "name": "新见见销售项目",
      "companyId": "2c928082889b91e801889bb177ce0019",
      "companyName": "珙县天顺商品混凝土有限公司",
      "customerId": "2c9180878c49221f018c493074a40000",
      "customerName": "四川新建建筑科技有限公司",
      "executeCompanyName": "新建科技",
      "engineeringName": "新津政府大楼建设项目",
      "contractCode": "HT0001",
      "contractMoney": "500000",
      "accountMoney": "100000.00",
      "soldMoney": "0",
      "balanceMoney": "96280.00",
      "warningMoney": "500",
      "balanceWarningType": 1,
      "contact": "李勋",
      "contactPhone": "18800008888",
      "projectAddress": "新津路10号",
      "isSignContract": null,
      "isCooperate": 1,
      "remark": "",
      "createUserName": null,
      "status": 2,
      "fileForms": null
    },
    "engineeringName": "新津政府大楼建设项目",
    "constructionLocation": "东门",
    "produceTaskId": "2c9180878c493892018c49415dea01ff",
    "produceTaskName": "C30-100方",
    "invoiceNumber": "SHD2023120800001",
    "sendTime": "2023-12-08 19:56:05",
    "signTime": "2023-12-08 19:56:20",
    "finishedTime": "2023-12-08 19:56:42",
    "taskPouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringType": 2,
    "pouringMethodId": "2c9180878c1fe469018c2359293701fa",
    "pouringMethod": "天泵",
    "scheduleCubicMeters": "5",
    "transferCubicMeters": "0",
    "totalCubicMeters": "5",
    "status": 5,
    "isDelayed": 0,
    "delayedTime": null,
    "waybillId": "2c9180878c493892018c4947d589021c",
    "projectId": "2c9180878b97fbbb018b98014dc70003",
    "projectName": "新川中心商混场",
    "projectAddress": null,
    "waybillNumber": "YD2023120800001",
    "paperNumber": null,
    "driverId": "2c90806c89cde2cb0189ce15c8e30003",
    "driverName": "测试司机",
    "mobile": null,
    "plateNumber": "川Q65323",
    "pouringCode": "2c9180878bb9c4a4018bc376e98209ae",
    "pouringCodeName": "C30",
    "impermeabilityLevel": null,
    "mixingPlant": "1号搅拌站",
    "isSupplement": 0,
    "dispatcherName": "测试2",
    "operatorName": "陈劲松",
    "supplyMethod": 1,
    "mobileDischargeLng": "104.084161",
    "mobileDischargeLat": "30.520191",
    "apaasDischargeLng": "",
    "apaasDischargeLat": "",
    "address": "中国四川省成都市双流区华阳街道新裕路在博雅城市广场C座1211附近",
    "mineralName": "C30",
    "mineralNumber": "XC-C30",
    "mineralTypeTypeId": "2c9180878b9807fd018b98162c370013",
    "mineralTypeTypeName": "商混",
    "salesUnitPrice": "80",
    "purchaseUnitPrice": null,
    "density": "2",
    "totalCost": "400.00",
    "purchaseTotalCost": null,
    "supplementFile": null,
    "purchaseVoucherFile": null,
    "customerId": "2c9180878c49221f018c493074a40000",
    "customerName": "四川新建建筑科技有限公司",
    "sellerId": null,
    "sellerName": null,
    "pouringLeaseContractId": "2c9180878c1fe469018c235aa35301fc",
    "pouringLeaseContractName": "时代峰骏泵租赁 1109",
    "produceTaskVo": null,
    "cmprojectId": "2c9180878c493892018c493d01fa0006",
    "cmprojectName": "新见见销售项目",
    "cmprojectAddress": null
  }
];
var jsonData2 = '恢复健康煞风景快递费萨达办法花洒表达法花洒';
  void _incrementCounter() {
    // LoadUtil.showLoad();
    LogUtil.d('-->jsonData=$jsonData2');
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // TRY THIS: Try changing the color here to a specific color (to
        // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar
        // change color while the other colors stay the same.
        backgroundColor: Theme.of(context).colorScheme.primary,
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text(widget.title),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          //
          // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint"
          // action in the IDE, or press "p" in the console), to see the
          // wireframe for each widget.
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headlineMedium,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}